fix(vscode-ext): prevent autosave from opening a Save File dialog on every edit - #3781
claudiusararu wants to merge 1 commit into
Conversation
|
Thanks, Claudiu—your change addresses the unwanted downloads. Our V2 testing also uncovered an initialization issue that prevents us from verifying autosave end to end. We’ve retained your approach and the reproduction evidence in our V2 follow-up, and we’re closing this V1 PR in favor of that work. The fix hasn’t shipped yet. |
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Problem
Fixes #3768. Editing any
.docxin the SuperDoc VS Code extension pops a browser "Save File" dialog on essentially every edit (the ~1s debounced autosave and Cmd/Ctrl+S both trigger it), which makes real editing unusable.Root cause
The webview autosave calls
editor.export({ format: 'docx' }). SuperDoc'sexport()defaultstriggerDownload: true, and for a single docx blob that path callscreateDownload(...)→window.showSaveFilePicker, opening the dialog. (formatis also not a recognizedexport()option — the correct key isexportType.)Fix
Pass
triggerDownload: false(and the correctexportType: ['docx']) soexport()returns the Blob directly — exactly what theblob.arrayBuffer()→postMessagesave path consumes. No dialog; silent autosave-to-disk keeps working.